package com.teacher.mobile.controller;


import com.teacher.common.CommonResult;
import com.teacher.service.IHealthDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author jiangzhuohang
 * @since 2025-04-12
 */
@RestController
@RequestMapping("/healthData")
@Api(tags = "毕设设备健康数据接口")
public class HealthDataController {

    @Autowired
    private IHealthDataService healthDataService;

    @ApiOperation("获取该设备健康数据列表")
    @GetMapping("/getHealthDataList")
    public CommonResult getHealthData(String number){
        return healthDataService.getHealthData(number);
    }



    @GetMapping("/addHealthData")
    @ApiOperation("测试用模拟数据添加 ")
    public CommonResult addHealthData(String number,Integer type,Integer data) {
        return healthDataService.addHealthData(number,type,data);
    }


/*
    @DeleteMapping("/deleteHealthDataById")
    @ApiOperation("通过 id批量删除设备 ")
    public CommonResult deleteHealthDataById(@RequestBody List<Long> list) {
        return  healthDataService.deleteHealthData(list);
    }
    @PutMapping("/updateHealthDataById")
    @ApiOperation("通过id修改设备")
    public CommonResult updateHealthDataById(@RequestBody HealthDataUpdateDto updateDto) {
        return healthDataService.updateHealthData(updateDto);
    }*/
}

